package com.xiaochi.subject.common.enums;

import lombok.Getter;

/**
 * @author zqx
 * @since 2024/7/21
 * 题目枚举类
 */
@Getter
public enum SubjectInfoTypeEnum {

    RADIO(1,"单选"),
    MULTIPLE(2,"多选"),
    JUDGE(3,"判断"),
    BRIEF(4,"简答");


    private int code;
    private String message;

    SubjectInfoTypeEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public static SubjectInfoTypeEnum getResultCodeEnum(int code) {
        for (SubjectInfoTypeEnum resultCodeEnum : SubjectInfoTypeEnum.values()) {
            if (resultCodeEnum.getCode() == code) {
                return resultCodeEnum;
            }
        }
        return null;
    }
}
